<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>在线OJ-题目列表</title>
    <style>
        /* 起手式, 100%保证我们的样式设置可以不受默认影响 */
        * {
            /* 消除网页的默认外边距 */
            margin: 0px;
            /* 消除网页的默认内边距 */
            padding: 0px;
            box-sizing: border-box;
        }

        html,
        body {
            width: 100%;
            height: 100%;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f5f9f8;
        }

        .container {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .navbar {
            width: 100%;
            height: 60px;
            background: linear-gradient(135deg, #1a936f 0%, #0d7a5a 100%);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            display: flex;
            align-items: center;
            padding: 0 20px;
            position: fixed;
            top: 0;
            z-index: 1000;
        }

        .navbar a {
            display: inline-block;
            padding: 0 20px;
            color: white;
            font-size: 16px;
            line-height: 60px;
            text-decoration: none;
            transition: all 0.3s ease;
            font-weight: 500;
        }

        .navbar a:hover {
            background-color: rgba(255, 255, 255, 0.15);
            transform: translateY(-2px);
        }

        .navbar .login {
            margin-left: auto;
            background-color: rgba(255, 255, 255, 0.2);
            border-radius: 4px;
            height: 36px;
            line-height: 36px;
            margin-top: 12px;
        }

        .navbar .login:hover {
            background-color: rgba(255, 255, 255, 0.3);
        }

        .question_list {
            width: 90%;
            max-width: 1000px;
            margin: 100px auto 40px;
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
            padding: 30px;
            text-align: center;
        }

        .question_list h1 {
            color: #1a936f;
            font-size: 32px;
            margin-bottom: 30px;
            font-weight: 600;
            position: relative;
            padding-bottom: 15px;
        }

        .question_list h1:after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 3px;
            background-color: #1a936f;
            border-radius: 2px;
        }

        .question_list table {
            width: 100%;
            font-size: 16px;
            border-collapse: collapse;
            margin-top: 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            border-radius: 8px;
            overflow: hidden;
        }

        .question_list table th {
            background-color: #1a936f;
            color: white;
            padding: 15px 10px;
            font-weight: 600;
            text-align: center;
        }

        .question_list table tr {
            transition: all 0.2s ease;
        }

        .question_list table tr:nth-child(even) {
            background-color: #f8fcfb;
        }

        .question_list table tr:hover {
            background-color: #e8f6f2;
            transform: translateY(-1px);
        }

        .question_list table td {
            padding: 15px 10px;
            border-bottom: 1px solid #e0e0e0;
        }

        .question_list table .item a {
            text-decoration: none;
            color: #2c3e50;
            font-weight: 500;
            transition: all 0.2s ease;
            display: block;
            padding: 5px;
            border-radius: 4px;
        }

        .question_list table .item a:hover {
            color: #1a936f;
            background-color: rgba(26, 147, 111, 0.1);
            text-decoration: none;
        }

        .difficulty-easy {
            color: #2ecc71;
            font-weight: 600;
        }

        .difficulty-medium {
            color: #f39c12;
            font-weight: 600;
        }

        .difficulty-hard {
            color: #e74c3c;
            font-weight: 600;
        }

        .footer {
            width: 100%;
            height: 60px;
            text-align: center;
            line-height: 60px;
            color: #7f8c8d;
            margin-top: auto;
            background-color: #f1f5f4;
            border-top: 1px solid #e0e7e5;
            font-size: 14px;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .question_list {
                width: 95%;
                padding: 20px 15px;
                margin-top: 80px;
            }
            
            .question_list h1 {
                font-size: 24px;
            }
            
            .navbar a {
                padding: 0 12px;
                font-size: 14px;
            }
            
            .question_list table {
                font-size: 14px;
            }
            
            .question_list table th, 
            .question_list table td {
                padding: 10px 5px;
            }
        }
    </style>
</head>

<body>
    <div class="container">
        <!-- 导航栏 -->
        <div class="navbar">
            <a href="/">首页</a>
            <a href="/all_questions">题库</a>
            <a class="login" href="#">登录</a>
        </div>
        
        <div class="question_list">
            <h1>OnlineJudge 题目列表</h1>
            <table>
                <tr>
                    <th class="item">编号</th>
                    <th class="item">标题</th>
                    <th class="item">难度</th>
                </tr>
                <!-- 示例数据 - 实际使用时将由后端数据替换 -->
                <!-- 模板数据占位符，实际使用中由后端数据替换 -->
                {{#question_list}}
                <tr>
                    <td class="item">{{number}}</td>
                    <td class="item"><a href="/question/{{number}}">{{title}}</a></td>
                    <td class="item">{{star}}</td>
                </tr>
                {{/question_list}}
            </table>
        </div>
        
        <div class="footer">
            <p>© 2023 OnlineJudge 在线评测系统 | 保留所有权利</p>
        </div>
    </div>
</body>

</html>